class Aula < ActiveRecord::Base
    belongs_to :voluntario
    has_many :aula_alunos
    
    def date
        unless self.data.nil?
            return self.data.strftime('%d/%m/%Y')
        end
    end

    def date=(v)
        begin
            self.data = Date.strptime(v, "%d/%m/%Y")
        rescue ArgumentError => e
            nil
        end
    end

end
